package com.yt.order.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.yt.order.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.yt.order.mapper.ProductCategoryMapper;
import com.yt.order.models.service.IProductCategoryService;
import com.yt.order.models.bo.ProductCategorySaveBO;
import com.yt.order.models.dto.ProductCategoryDTO;

/**
 * 工单控制器
 *
 * @author xieyanfei
 * @Date 2025-09-08 13:32:53
 */
@DubboService
public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMapper, ProductCategoryDTO> implements IProductCategoryService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(ProductCategorySaveBO saveBO) {
        ProductCategoryDTO dto = new ProductCategoryDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
